<?php
require_once("../connection/connect.php");
class user{
	private $id = '', $username = '', $email = '', $group_id = '', $package = '';
	function edit($id, $username,$email,$group_id,$package_id){
		$this->$id = $id;
		$this->$username = $username;
		$this->$email = $email;
		$this->$group_id = $group_id;
		$this->$package_id = $package_id;
		$sql = "UPDATE users SET username = '$username', email = '$email', group_id = $group_id, package_id = $package_id WHERE id = $id";
		$a = mysql_query($sql);
	}
	
	function delete($id){
	$this->$id = $id;
	$sql = "DELETE FROM users WHERE id = $id";
	$a = mysql_query($sql);
	}
}
/*
$u = new user();
$u->edit('1','DEF','vanca_tb@yahoo.com','2','2');
echo "ok";
*/
?>
